package com.dhj.methodsTest;

import com.dhj.streamTest.entity.Author;

import java.util.List;

import static com.dhj.streamTest.entity.AuthorList.getAuthors;

public class Demo1 {

    public static void main(String[] args) {
        List<Author> authors = getAuthors();
        authors.stream().distinct().forEach(author -> author.getName());

        System.out.println("------------------------------");


        authors.stream().distinct().forEach(Author::getName);

    }
}
